--
-- Include the Qt functionalities and create a shortcut
--
include( "premake-qt/qt.lua" )
local qt = premake.extensions.qt

-- main solution
solution "premakeLearn"

	configurations { "Debug", "Release" }
	location "build"
	
	filter "configurations:Debug"
		defines { "DEBUG" }
		symbols "On"

	filter "configurations:Release"
		defines { "NDEBUG" }
		optimize "On"
	
	configuration { "Debug" }
		qtsuffix "d"
	configuration { }  
	includedirs 
	{
		"./3rd/include",
		"./include"
	}
	qt.enable()
	qtpath "E:/Qt/Qt5.8.0-x86/5.8/msvc2015"
	qtmodules { "core", "gui", "widgets", "opengl", "printsupport"}
	qtprefix "Qt5"
		
-- Qt project
	project "TestQt"
		kind "WindowedApp"
		language "C++"
		targetdir "bin/%{cfg.buildcfg}"
		files 
		{
  			"./include/TestQt/**.h",
  			"./source/TestQt/**.cpp",
  			"./source/TestQt/**.ui",
  			"./source/TestQt/**.qrc",
		}